/*
 * init.c
 *
 *  Created on: Oct 14, 2010
 *      Author: ra
 */

#include "../include/init.h"

void init_PORT() {
	DDRC = 0x00; 	// Set PORT C to input
	PORTC = 0xFF; 	// Enable internal pull-up on input pins 0-3 on PORT C

}

void init() {

	stdout = &mystdout;
	init_PORT();
	init_LCD();
	init_ADC();
	init_PWM_timer();
	DDRC=0;
	DDRB |= 0x01;   // LCD backlight pwr cntl pin.

	lcd_goto_pos(0);
	printf("Aveskog & Tapper");
	for (int i=0; i<10; i++)

	{
		_delay_ms(500);

		CLEARBIT(PORTB,PIN0); //turns on LCD backlight power.
		_delay_ms(500);
		SETBIT(PORTB,PIN0); //turns on LCD backlight power.


	}

}
